<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">标题</td><td class="tv" id="title" colspan="3"></td></tr>

                <tr><td class="tt">汇报类型</td><td class="tv" id="huilei_name"></td><td class="tt">关联工作汇报</td><td class="tv colorlan" id="qianid_name"></td></tr>
                <tr><td class="tt">汇报日期</td><td class="tv" id="huidt"></td><td class="tt">汇报周期</td><td class="tv" id="huizhoudt"></td></tr>
                <tr><td class="tt">安排类型</td><td class="tv" id="anlei_name"></td><td class="tt">安排周期</td><td class="tv" id="anzhoudt"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo_list_hui">汇报内容</script>
            <div class="tableShow">
                <table id="datalist_list_hui" lay-filter="datalist_list_hui"></table>
            </div>
        </div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo_list_an">安排内容</script>
            <div class="tableShow">
                <table id="datalist_list_an" lay-filter="datalist_list_an"></table>
            </div>
        </div>

        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_port_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;

                $("#title").text(data.title);
                $("#huilei_name").text(data.huilei_name);
                $("#huidt").text(data.huidt);
                $("#huizhoudt").text(data.huizhoudt);
                $("#anlei_name").text(data.anlei_name);
                $("#anzhoudt").text(data.anzhoudt);
                $("#explain").text(data.explain);



                var qianid_info = res.data.qianid_info;
                if(qianid_info){
                    $("#qianid_name").text(qianid_info.title).click(function () {
                        openPage('../port/show.php?id='+qianid_info.id);
                    });
                }


                var huitableList = table.render({
                    elem: "#datalist_list_hui",data:res.data.list_hui, toolbar: '#toolbarDemo_list_hui', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'shi', title: '原计划事项'}
                        ,{field: 'wandt', title: '原计划完成时间'}
                        ,{field: 'wanqing_name', title: '完成情况'}
                        ,{field: 'miao', title: '结果描述'}
                        ,{field: 'fupan', title: '问题复盘'}
                        ,{field: 'gaifang', title: '经验总结及改进方案'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });


                var antableList = table.render({
                    elem: "#datalist_list_an",data:res.data.list_an, toolbar: '#toolbarDemo_list_an', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'shi', title: '计划事项'}
                        ,{field: 'wandt', title: '计划完成时间'}
                        ,{field: 'fengpan', title: '风险预判'}
                        ,{field: 'yuzhi', title: '预案制定'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });


                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('port', param_id);
    });



</script>
</body>
</html>




